clear;clc;close all; 

suffix = 'CDS_LD';
dir = 'C:\Users\Mittal\Documents\Work\Code\survival-analysis\perl\LR_CDS_NTDB_TrainCDS+NTDB_TestCDS_Imputed\35-65\';

load([dir 'weightMap_' suffix])

keys = weightMap1.keys;
% weightMap = containers.Map('KeyType','char','ValueType','double');
fid = fopen([dir 'RescaledRelWeights_' suffix '.txt'],'w');
for i = 1:length(keys),
    key = keys{i};
    weightMap(i) = (weightMap1(key) + weightMap2(key) + weightMap3(key) + weightMap4(key) + weightMap5(key) + weightMap6(key) + weightMap7(key) + weightMap8(key) + weightMap9(key) + weightMap10(key))/10;
    fprintf(fid,'%s#%d\n',key,weightMap(i));
end
fclose(fid);